xquery version "0.9-ml"

xs:string('[')
,
let $node := xdmp:get-request-field("node")
(: let $node := "doc('wines.xml')/wines/wine/vintage" :)

for $value in xdmp:eval($node)
	return
		for $count in (xs:string('"'), $value, xs:string('",'))
		return $count
,
xs:string(']')